package com.ikun.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 挂号预约表(Convention)实体类
 *
 * @author makejava
 * @since 2024-02-26 09:43:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("convention")
public class Convention implements Serializable {
    private static final long serialVersionUID = -55144647055159897L;
    /**
     * 预约id
     */
    private Long id;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 科室id
     */
    private Integer departmentId;
    /**
     * 医生id
     */
    private Integer docId;
    /**
     * 患者编号
     */
    private Integer patId;
    /**
     * 挂号类型id
     */
    private Integer typeId;
    /**
     * 价格
     */
    private String money;
    /**
     * 预约日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String date;
    /**
     * 时间段id
     */
    private Integer timeId;
    /**
     * 预约状态，0等待，1完成，2取消
     */
    private Integer state;
    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String createTime;
    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String updateTime;
    /**
     * 删除状态，0未，1删除
     */
    private Integer del;
    /**
     * 订单号
     */
    private String tradeNo;
    /**
     * 订单号
     */
    private Integer payType;


    /**
     * 患者表
     */
    @TableField(exist = false)
    private Patient patient;
    /**
     * 用户表
     */
    @TableField(exist = false)
    private User user;
    /**
     * 医生表
     */
    @TableField(exist = false)
    private Docker docker;
    /**
     * 科室表
     */
    @TableField(exist = false)
    private Department department;
    /**
     * 挂号类型表
     */
    @TableField(exist = false)
    private RegistrationType registrationType;
    /**
     * 时间段表
     */
    @TableField(exist = false)
    private TimePeriod timePeriod;


}
